Ingeniería Biomédica
2024-01-22
Definition
An experiment is a physical procedure that produces some kind of result.
Definition
An event is a set of experiment’s possible results.
Consejo
A sample space is the set of ALL possibles results of an experiment.
Name: ECG Heartbeat Categorization Dataset.
URL: https://www.kaggle.com/datasets/shayanfazeli/heartbeat?resource=download
For the given events A and B that are in a sample space S:
Axioms
Definition
A random variable is a real valued function of the elements of a sample space, S . Given an experiment, E , with sample space, S, the random variable maps each possible outcome of E.
Definition
The probability mass function (PMF), \(P_X\left(x\right)\), of a random variable, X, is a function that assigns a probability to each possible value of the random variable, X.
Discrete
\[\sum_{\chi \in X}P_X\left(\chi \right) = 1\]
Continuous
\[\int_{-\infty}^{\infty}P_X\left(\chi \right)d\chi = 1\]
Discrete
\[\mu = \sum_{\chi \in X}\chi P_X\left(\chi \right)\]
Continuous
\[\mu=\int_{-\infty}^{\infty}\chi P_X\left(\chi \right)d\chi = 1\]
Discrete
\[\sigma^2 = \sum_{\chi \in X}\left(\chi - \mu \right)^2 P_X\left(\chi \right)\]
Continuous
\[\sigma^2 = \int_{-\infty}^{\infty}\left(\chi - \mu \right)^2 P_X\left(\chi \right)d\chi = 1\]
counts01, bin_edges01 = np.histogram(ecg1, bins=10, density=True)
counts02, bin_edges02 = np.histogram(ecg1, bins=50, density=True)
counts03, bin_edges03 = np.histogram(ecg1, bins=100, density=True)
fig01=plt.figure()
plt.plot(bin_edges01[1:], counts01/sum(counts01), label="Estimation with 10 bins")
plt.plot(bin_edges02[1:], counts02/sum(counts02), label="Estimation with 50 bins")
plt.plot(bin_edges03[1:], counts03/sum(counts03), label="Estimation with 100 bins")
plt.legend()
plt.grid()
plt.xlabel("Normalised ECG Value")
plt.ylabel("Estimated PDF Value")0.09001020772910533
0.02551116143316462